import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopDecorateController } from '../../../controllers';
const uctoominishopDecorateRouter = new Router();
const minishopDecorateController = new uctooMinishopDecorateController();

uctoominishopDecorateRouter.post('/add', requireUser, minishopDecorateController.add);
uctoominishopDecorateRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_decorate'), minishopDecorateController.edit);
uctoominishopDecorateRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_decorate'), minishopDecorateController.delete);

//For getting minishopDecorate with permission control
uctoominishopDecorateRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_decorate'), minishopDecorateController.getSingle);
uctoominishopDecorateRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_decorate'), minishopDecorateController.getMany);
uctoominishopDecorateRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_decorate'), minishopDecorateController.getMany);

//#endregion AutoCreateCode
export default uctoominishopDecorateRouter;
